package com.bjesc_b2c.app.appraiset.adapter;

import android.content.Context;

import com.bjesc_b2c.app.appraiset.R;

import java.util.List;

import app.pinggushi.bjesc.com.baserecyclerview.adapter.CommonAdapter;
import app.pinggushi.bjesc.com.baserecyclerview.adapter.base.ViewHolder;
import master_bean.BasicInfoBean;

/**
 * Created by yidong on 2017/7/11.
 */

public class BaseInfoAdapter extends CommonAdapter<BasicInfoBean.ImgsBean> {

    public BaseInfoAdapter(Context context, int layoutId, List<BasicInfoBean.ImgsBean> datas) {
        super(context, layoutId, datas);
    }

    @Override
    protected void convertView(ViewHolder holder, BasicInfoBean.ImgsBean imgsBean, int position) {
        holder.setFrescoUrl(R.id.fresc_car_source_photo,imgsBean.getCover(),true);
        if (imgsBean.getType().equals("7")){
            holder.setText(R.id.tv_photo_name,"前部");
        }
        if (imgsBean.getType().equals("8")){
            holder.setText(R.id.tv_photo_name,"内饰中控");
        }
        if (imgsBean.getType().equals("9")){
            holder.setText(R.id.tv_photo_name,"后部");
        }
        if (imgsBean.getType().equals("10")){
            holder.setText(R.id.tv_photo_name,"手续照片");
        }
        holder.setText(R.id.tv_photo_num,"("+imgsBean.getCount()+") 张");
    }
}
